import axios from '../axios';

const api = {
  searchHotWords(params) {
    return axios.get('/api/meituan/header/searchHotWords.json', { params });
  },
  search() {
    return axios.get('/api/meituan/header/search.json');
  },
  navList() {
    return axios.get('/api/meituan/index/nav.json');
  },
  literary() {
    return axios.get('/api/meituan/index/resultsByKeywords.json');
  },
  goodsList() {
    return axios.get('/api/meituan/list/goodsList.json');
  },
  recommend() {
    return axios.get('/api/meituan/list/recommend.json');
  },
  classify(params) {
    return axios.get(' /api/meituan/list/classify.json', params);
  },
  hotList() {
    return axios.get('/api/meituan/city/hot.json');
  },
  recents() {
    return axios.get('/api/meituan/city/recents.json');
  },
  getProvinceList() {
    return axios.get('/api/meituan/city/province.json');
  },
  areaList() {
    return axios.get('/api/meituan/list/areaList.json');
  },
  getPosition() {
    return axios.get('/api/meituan/city/getPosition.json');
  },
  getCityList() {
    return axios.get('/api/meituan/city/cityList.json');
  },
  getLogin(params) {
    return axios.get('/api/meituan/login', { params });
  },
  register(params) {
    return axios.get('/api/meituan/register', params);
  },
  getDetail(params) {
    return axios.get('/api/meituan/product/detail.json', params);
  },
};

export default api;
